<template>
	<view class="user-container">
		<!-- 登录组件区域 -->
		<my-login v-if="!token"></my-login>
		<!-- 用户信息组件区域 -->
		<my-userinfo v-else></my-userinfo>
	</view>
</template>

<script>
// 导入组件
import myLogin from '@/components/common/my-login.vue';
import myUserinfo from '@/components/common/my-userinfo.vue';
import badgeMix from '@/mixins/tabbar-badge.js';
import { mapState, mapMutations } from 'vuex';
export default {
	mixins: [badgeMix],
	// 注册组件
	components: {
		myLogin,
		myUserinfo
	},
	data() {
		return {};
	},
	methods: {},
	computed: {
		...mapState('m_user', ['token'])
	}
};
</script>

<style lang="scss">
// 外层容器
page,
.user-container {
	height: 100%;
}
</style>
